package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.*;
import com.indusfo.spc.pojo.MatRepair;
import com.indusfo.spc.pojo.MatRepair;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/25 8:39
 * @Version 1.0
 */

public interface MatRepairMapper {

    /**
     * 新增
     */
    int insertMatRepair(MatRepair matRepair);

    /**
     * 修改
     */
    int updateMatRepair(MatRepair matRepair);

    /**
     * 查询
     */
    List<MatRepair> queryMatRepair(MatRepair matRepair);

    /**
     * 总数
     */
    int countMatRepair(MatRepair matRepair);

    /**
     * 判重
     */
    int checkMatRepair(MatRepair matRepair);

    /**
     * 启停
     */
    int deleteMatRepair(@Param("matRepairIds") List<Integer> matRepairIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询维修流程
     */
    List<MatRepair> queryMatRepairByMatVerId(@Param("matVerId") Integer matVerId);

    /**
     * 级联删除维修流程
     */
    int deleteMatRepairByMatRepairId(@Param("matRepairId") Integer matRepairId, @Param("dataState") Integer dataState);

    List<MatRepair> queryMatRepairByMatFlowList(@Param("orderList") List<Order> orderList);
}